<?php
namespace Home\Model;
use Think\Model;
class ApiModel extends Model {
    // 定义自动验证
    protected $_validate    =   array(
        array('api_name','require','接口名不能为空'),
        array('api_intro','require','接口说明不能为空'),
        array('request_url','require','请求地址不能为空'),
        array('api_method','require','请求方法不能为空'),
    );

    // protected $_auto = array(
    //     array('create_time','time',1,'function'),
    // );

    // protected $_link = array(
    //     'ApiParam' => array(
    //         'mapping_type'  => self::HAS_MANY,
    //         'class_name'    => 'ApiParam',
    //         'foreign_key'   => 'api_id',
    //         'mapping_name'  => 'param',
    //         'mapping_order' => 'param_id desc',
    //     ),
    // );
 }